﻿using Cofe.Core.Property;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Cofe.Core.Implements
{
    public class AnyPropertyFilter : IPropertyFilter
    {
        public AnyPropertyFilter(params object[] properties)
        {
            _properties = properties == null ? new object[] { } : properties;
        }

        public AnyPropertyFilter(IEnumerable<object> properties)
        {
            _properties = properties.ToArray();
        }

        object[] _properties;

        public bool Match(object property)
        {
            return _properties.Contains(property);
        }
    }
}
